<?php namespace Home\Controller; 
use Hdphp\Controller\Controller;
use Home\Model\Address;
//测试控制器
class AddressController extends CommonController{
    private $model;
    //构造函数
    public function __init(){
        parent::__init();
        $this->model = new Address;
    }
    
    //动作
    public function index(){
        //载入模板
        View::make();
    }
    //
    //添加地址
    public function add(){
        if(IS_AJAX){
            if(!$this->model->store()){
                return false;
            }
            echo 1;
        }
    }

}